// 全局前置守卫做判断
import router from '@/router'
import store from '@/store'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css' // 引入进度条样式
import { asyncRoutes } from '@/router'

router.beforeEach(async(to, from, next) => {
  NProgress.start()
  next()
})
// beforeEach中重定向后 不会再走afterEach
router.afterEach((to, from) => {
  NProgress.done()
})
